package com.gzs.learn.payment.inf.exception;

import com.gzs.learn.payment.inf.enums.PaymentResponseCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public class PaymentException extends RuntimeException {
    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    private int errorCode;

    private String msg;


    public PaymentException(String msg) {
        this(0, msg);
    }

    public PaymentException(Throwable t) {
        super(t);
    }

    public PaymentException(PaymentResponseCodeEnum responseCodeEnum) {
        this(responseCodeEnum.getCode(), responseCodeEnum.getDesc());
    }

}
